February 13, 2002

Instructions for replicating results in Michael Tomz, Jason Wittenberg, and
Joshua Tucker, "An Easy and Accurate Regression Model for Multiparty Electoral
Data," POLITICAL ANALYSIS 10, no. 1 (2002).

The analysis was done using Gauss 3.5.17 for Windows, Stata 7.0 for Windows, and
S-Plus 2000. The Gauss code will not run in versions of Gauss prior to 3.5. It
is also necessary to have the Constrained Maximum Likelihood module for Gauss
installed.


==> Included Files

Documentation:     readme.txt (this file), polandal.txt, polandcb.txt,
                   epcp.pdf, epcp.doc
Raw Data (format): uk.asc (ASCII Text), poland.dta (Stata)
Gauss Programs:    figure1.prg, imputey.prg, loaduk.prg, main.prg, monte.prg
Gauss Procedures:  cdfbvt.g, cdft2.g, exist.g, fisherz.g, fisherzi.g, fmtt.g,
                   in.g incrun.g, incsim.g, incsim2.g, lng.g, loada.g,
                   loadvars.g, makeci.g, mnli.g, pdft2.g, rndmn.g, rndmt.g,
                   scalone.g, str2mat.g, tdfi.g, token2.g, tsigi.g
Gauss Libraries:   comp2.lcg, lpack.lcg, probs.lcg
Gauss SRC Files:   comp2.src, lpack.src, probs.src
Other Gauss Files: comp2.dec, comp2.ext
Clarify Suite:     clarify.pdf, clarify.ps, estsimp.ado, setx.ado, simqi.ado,
                   sumqi.ado, tlogit.ado, estsimp.hlp, setx.hlp, simqi.hlp,
                   sumqi.hlp, tlogit.hlp
Stata Do-Files:    mkukdta.do, poland.do, runclar.do, runclar59.do ...
                   runclar92.do, sec51.do, sec52.do, sec53.do, sec54.do, table1.do
S-Plus Graphics:   figure1.q, sec52.q, sec53.q, sec54.q
Unpublished Figs:  noprior.pdf, noprior.doc
Using Clarify:     software.pdf, software.doc


==> To install the files:

1. Unzip ttwrep.zip into your working directory.

2. Move the .lcg files to the directory that holds the Gauss library files.


==> To replicate Section 4:

1. Run MONTE.PRG (Gauss), which performs Monte Carlo comparison of KK versus
SUR.  The program creates a Gauss matrix file called FULLMC.FMT and an output
file called MONTE.OUT

2. Run FIGURE1.PRG (Gauss), which reads FULLMC.FMT, conducts further
comparisons, and creates an output file FIGURE1.OUT

3. Run TABLE1.DO (Stata), which reads the data in MONTE.OUT and reproduces the
values in Table 1

4. Run FIGURE1.Q (SPlus) to read the data from FIGURE1.OUT and reproduce Fig 1


==> To replicate Section 5:

1. Run MAIN.PRG (Gauss), which performs the estimation and creates the output
files POSTEFF.OUT, MODEL.OUT, and UKOUT1.OUT

2. Run IMPUTEY.PRG (Gauss), which performs auxiliary estimations and creates the
output file UKOUT2.OUT

3. Run MKUKDTA.DO (Stata), which reads UKOUT1.OUT and UKOUT2.OUT and then
creates a Stata dataset called UKOUT.DTA

4. Run RUNCLAR.DO (Stata), which estimates the SUR model, using Clarify, for
each election from 1959 through 1992.

5. For Section 5.1, run SEC51.DO (Stata)

6. For Section 5.2, run SEC52.DO (Stata), followed by SEC52.Q (Splus).  The
splus code may be platform-dependent.

7. For Section 5.3, run SEC53.DO (Stata), followed by SEC53.Q (Splus).  The
splus code may be platform-dependent.

8. For Section 5.4, run SEC54.DO (Stata), followed by SEC54.Q (Splus).  The
splus code may be platform-dependent.


==> To Replicate Section 6:

1.  Run POLAND.DO (Stata), which re-analyzes the effect of economic conditions
on election results in Poland using SUR and calculates the number of seats won
by each of the parties under the hypothetical economic conditions specified by
Gibson and Cielecka.

2.  Note: POLAND.DTA (Stata dataset) contains the data for the analysis.
POLANDCB.TXT is a codebook for the dataset.  That file also describes changes we
made to the Gibson-Cielecka data to correct minor coding errors.  POLANDAL.TXT
gives the algorithm that we implemented in POLAND.DO to allocate seats to the
various political parties.
